package java02.ui;

import java02.bll.Rectangle;
import java02.bll.Square;
import java02.bll.standard.IShape;
import java02.bll.standard.ShapeOperation;

interface IA {
    void f1();

    void f2();
}

interface IB extends IA {
    void f3();
    void f4();
}

class C implements IB {

    @Override
    public void f1() {

    }

    @Override
    public void f2() {

    }

    @Override
    public void f3() {

    }

    @Override
    public void f4() {

    }
}

// 客户--求长方形或正方形的面积（基于规范的求解方式）
public class Client {
    public static void main(String[] args) {
        IShape shape = new Square(5);
        double area = ShapeOperation.areaOperation(shape);
        double perimeter = ShapeOperation.perimeterOperation(shape);

        shape = new Rectangle(5, 4);
        area = ShapeOperation.areaOperation(shape);
        perimeter = ShapeOperation.perimeterOperation(shape);
    }
}

